/********************************************************************
	Rhapsody	: 7.5 
	Login		: kbe
	Component	: DefaultComponent 
	Configuration 	: CodeConfig
	Model Element	: EventHandler
//!	Generated Date	: Thu, 13, Sep 2012  
	File Path	: DefaultComponent\CodeConfig\EventHandler.cpp
*********************************************************************/

//## auto_generated
#include "EventHandler.h"
//## link itsReactor
#include "Reactor.h"
//## package Default

//## class EventHandler
EventHandler::EventHandler() {
    itsReactor = NULL;
}

EventHandler::~EventHandler() {
    cleanUpRelations();
}

Reactor* EventHandler::getItsReactor() const {
    return itsReactor;
}

void EventHandler::cleanUpRelations() {
    if(itsReactor != NULL)
        {
            Reactor* current = itsReactor;
            if(current != NULL)
                {
                    current->_removeItsEventHandler(handle);
                }
            itsReactor = NULL;
        }
}

void EventHandler::__setItsReactor(Reactor* p_Reactor) {
    itsReactor = p_Reactor;
}

void EventHandler::_setItsReactor(Reactor* p_Reactor) {
    if(itsReactor != NULL)
        {
            itsReactor->_removeItsEventHandler(this);
        }
    __setItsReactor(p_Reactor);
}

void EventHandler::_clearItsReactor() {
    itsReactor = NULL;
}

void EventHandler::setHandle(HANDLE p_handle) {
    handle = p_handle;
}

HANDLE EventHandler::getHandle() const {
    return handle;
}

Event_Type EventHandler::getType() const {
    return type;
}

void EventHandler::setType(Event_Type p_type) {
    type = p_type;
}

/*********************************************************************
	File Path	: DefaultComponent\CodeConfig\EventHandler.cpp
*********************************************************************/
